﻿using NewChillers.Models;
using NewChillers.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace NewChillers.Views
{
    /// <summary>
    /// RecipeInfoView.xaml 的交互逻辑
    /// </summary>
    public partial class RecipeInfoView : Window
    {
        public RecipeInfoView(RecipeModel recipeModel, int actType, UserModel userModel)
        {
            var viewmodel = new RecipeInfoViewModel(recipeModel, actType, this, userModel);
            this.DataContext = viewmodel;

            InitializeComponent();
        }

        /// <summary>
        /// 鼠标按住可拖动 全位置
        /// </summary>
        private void RecipeInfoView_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }
    }
}
